﻿using Project.Model;
using System;
using System.Collections.Generic;
using System.Data.Entity.Migrations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Project.DAL
{
    public class UsersDal:BaseDal<Users>
    {
        Entities model = new Entities();

        public bool EditNewPwd(int uid, string pwd)
        {
            Users user = model.Users.Where(u => u.UId == uid).FirstOrDefault();

            user.loginpwd = pwd;

            int count = model.SaveChanges();

            return count > 0;
        }

    }
}
